package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.MySupplierMapper;
import com.qj.yantaishan.domain.MySupplier;
import com.qj.yantaishan.service.IMySupplierService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 我的供货商Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class MySupplierServiceImpl    extends ServiceImpl<MySupplierMapper, MySupplier>  implements IMySupplierService
{
    @Autowired
    private MySupplierMapper mySupplierMapper;

    /**
     * 查询我的供货商
     * 
     * @param sellerStoreId 我的供货商主键
     * @return 我的供货商
     */
    @Override
    public MySupplier selectMySupplierBySellerStoreId(Long sellerStoreId)
    {
        return mySupplierMapper.selectMySupplierBySellerStoreId(sellerStoreId);
    }

    /**
     * 查询我的供货商列表
     * 
     * @param mySupplier 我的供货商
     * @return 我的供货商
     */
    @Override
    public List<MySupplier> selectMySupplierList(MySupplier mySupplier)
    {
        return mySupplierMapper.selectMySupplierList(mySupplier);
    }

    /**
     * 新增我的供货商
     * 
     * @param mySupplier 我的供货商
     * @return 结果
     */
    @Override
    public int insertMySupplier(MySupplier mySupplier)
    {
        return mySupplierMapper.insertMySupplier(mySupplier);
    }

    /**
     * 修改我的供货商
     * 
     * @param mySupplier 我的供货商
     * @return 结果
     */
    @Override
    public int updateMySupplier(MySupplier mySupplier)
    {
        return mySupplierMapper.updateMySupplier(mySupplier);
    }

    /**
     * 批量删除我的供货商
     * 
     * @param sellerStoreIds 需要删除的我的供货商主键
     * @return 结果
     */
    @Override
    public int deleteMySupplierBySellerStoreIds(String sellerStoreIds)
    {
        return mySupplierMapper.deleteMySupplierBySellerStoreIds(Convert.toStrArray(sellerStoreIds));
    }

    /**
     * 删除我的供货商信息
     * 
     * @param sellerStoreId 我的供货商主键
     * @return 结果
     */
    @Override
    public int deleteMySupplierBySellerStoreId(Long sellerStoreId)
    {
        return mySupplierMapper.deleteMySupplierBySellerStoreId(sellerStoreId);
    }
}
